home *** CD-ROM | disk | FTP | other *** search
- /* this script saves the Spectrum's ROM to a file */
-
- /* test if emulator is present */
- address command
-
- if ~show(ports,ZXAM_REXX) then do
- requestchoice 'title "ZXAM Script error..." body "I can''t find the emulator''s port!!" gadgets "AARGH!"'
- exit
- end
-
- /* SAVE requester */
- oldpath=zxamactsavepath()
- oldpattern=zxamactpattern()
- zxampattern('#?')
- nombre=zxamsaverequester('Name for the ROM file...')
- zxamsavepath(oldpath)
- zxampattern(oldpattern)
- if nombre='' then exit 0 /* CANCEL */
-
- /* open file */
- if ~open('fichero',nombre,'W') then exit 0
-
- /* write the 16k of ROM */
- dummy=writech('fichero',zxamgetmem(0,16384))
-
- dummy=close('fichero')
-
- exit
-